﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucSearchBar.ascx.cs"
    Inherits="ExpertMIS.Forums.UserControl.ucSearchBar" %>

<script type="text/javascript"">
function doQuery(page){
    if($('#q').val() ==='' )
    {
        alert('请填写要搜索的关键字。');
        $('#q').focus();
        return false;
    }

    document.getElementById('frmSearch').action = page;
    return true;
}
</script>

<div class="search-bar-bg">
    <form id="frmSearch" method="post">
    <table style="border: 0; height: 100%;">
        <tr>
            <td style="width: 316px; text-align: center;">
                <input type="text" style="border: 0; height: 25px; width: 270px; line-height: 25px;
                    vertical-align: middle;" name="q" id="q" value="<% Response.Write(Request["q"]); %>"></input>
            </td>
            <td style="width: 108px; text-align: left;">
                <input type="image" src="../imgs/forums/ask.jpg" onclick="return doQuery('SearchThenPost.aspx');" />
            </td>
            <td style="width: 124px; text-align: left;">
                <input type="image" src="../imgs/forums/search.jpg" onclick="return doQuery('SearchResult.aspx');" />
            </td>
        </tr>
    </table>
    </form>
</div>
